package com.pingan.mobilegw.adapterservice;

import com.pingan.mobilegw.adapterservice.model.MapOperation;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * RPC响应对象
 * 
 * @author jiadao
 * @version $Id: TargetResponseObject.java, v 0.1 2013-4-12 下午3:31:56 jiadao Exp $
 */
public class TargetResponseObject implements Serializable {

    /** serialVersionUID */
    private static final long         serialVersionUID = 537332594395510986L;

    /** 请求的唯一id*/
    private String                    uniqueId;

    /** 操作结果，1000为成功其他失败 */
    private int                       resultStatus     = 1001;

    /** 操作结果描述 */
    private String                    memo;

    /** 响应内容的json串 */
    private String                    result;

    /** 业务属性增量记录 */
    private Map<String, MapOperation> changeAttributes = new HashMap<String, MapOperation>();

    /** 经过网关传递的cookie参数 */
    private Map<String, String>       cookies;

    /**
     * Getter method for property <tt>uniqueId</tt>.
     * 
     * @return property value of uniqueId
     */
    public String getUniqueId() {
        return uniqueId;
    }

    /**
     * Setter method for property <tt>uniqueId</tt>.
     * 
     * @param uniqueId value to be assigned to property uniqueId
     */
    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    /**
     * Getter method for property <tt>resultStatus</tt>.
     * 
     * @return property value of resultStatus
     */
    public int getResultStatus() {
        return resultStatus;
    }

    /**
     * Setter method for property <tt>resultStatus</tt>.
     * 
     * @param resultStatus value to be assigned to property resultStatus
     */
    public void setResultStatus(int resultStatus) {
        this.resultStatus = resultStatus;
    }

    /**
     * Getter method for property <tt>memo</tt>.
     * 
     * @return property value of memo
     */
    public String getMemo() {
        return memo;
    }

    /**
     * Setter method for property <tt>memo</tt>.
     * 
     * @param memo value to be assigned to property memo
     */
    public void setMemo(String memo) {
        this.memo = memo;
    }

    /**
     * Getter method for property <tt>result</tt>.
     * 
     * @return property value of result
     */
    public String getResult() {
        return result;
    }

    /**
     * Setter method for property <tt>result</tt>.
     * 
     * @param result value to be assigned to property result
     */
    public void setResult(String result) {
        this.result = result;
    }

    /**
     * Getter method for property <tt>changeAttributes</tt>.
     * 
     * @return property value of changeAttributes
     */
    public Map<String, MapOperation> getChangeAttributes() {
        return changeAttributes;
    }

    /**
     * Setter method for property <tt>changeAttributes</tt>.
     * 
     * @param changeAttributes value to be assigned to property changeAttributes
     */
    public void setChangeAttributes(Map<String, MapOperation> changeAttributes) {
        this.changeAttributes = changeAttributes;
    }

    /**
     * Getter method for property <tt>cookies</tt>.
     * 
     * @return property value of cookies
     */
    public Map<String, String> getCookies() {
        return cookies;
    }

    /**
     * Setter method for property <tt>cookies</tt>.
     * 
     * @param cookies value to be assigned to property cookies
     */
    public void setCookies(Map<String, String> cookies) {
        this.cookies = cookies;
    }

    /** 
     * @see Object#toString()
     */
    @Override
    public String toString() {
        return "TargetResponseObject [uniqueId=" + uniqueId + ", resultStatus=" + resultStatus
               + ", memo=" + memo + ", changeAttributes=" + changeAttributes + ", cookies="
               + cookies + "]";
    }

}
